<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>条件渲染</title>
</head>
<body>
<div id="div">
    <div v-if="num%3==0">div1</div>
    <div v-if-else="num%3==0">div2</div>
    <div v-else="num%3==2">div3</div>

    <div v-show="flag">div4</div>
</div>
</body>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el: "#div",
        data: {
            num: 1,
            flag: false
        },
    });
</script>
</html>